package com.hk.rabbitmq.controller;

import com.hk.rabbitmq.service.business.CommonBusiness;
import com.hk.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("mqtest")
@Slf4j
public class MqController {

    @Autowired
    private CommonBusiness commonBusiness;

    @GetMapping("sync")
    public R sync() {
        commonBusiness.mqSyncData();
        return R.ok();
    }

}
